home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 089a.dms / 089a.adf / EXAMPLE_PROGRAMS / example10_1.AMOS / example10_1.amosSourceCode
AMOS Source Code  |  1992-03-06  |  2KB  |  56 lines

  1. '=================== 
  2. Rem example10_1.amos 
  3. '=================== 
  4.  
  5.  
  6. Rem display a bob 1 from a loaded sprite file and animate it 
  7.  
  8.  
  9. Rem the usual stuff, not forgetting FLASH OFF, try it without it!
  10. '----------------------------------------------------------------
  11. Flash Off : Curs Off : Paper 0 : Hide : Cls 0
  12.  
  13.  
  14. Rem load the sprite file into bank 1 
  15. '--------------------------------------
  16. Load "df0:bobs/spacecraft.abk",1
  17.  
  18.  
  19. Rem use the colours from the sprite bank 
  20. '--------------------------------------- 
  21. Get Sprite Palette 
  22.  
  23.  
  24. Rem assign an Amal channel to bob 1
  25. '----------------------------------- 
  26. Channel 1 To Bob 1
  27.  
  28.  
  29. Rem Display BOB 1 at 10 pixels across and 100 pixels down the screen 
  30. Rem the 1 on the end is the current bob number in use. 
  31. '--------------------------------------------------------------------
  32. Bob 1,10,100,1
  33.  
  34.  
  35. Rem set up the animation sequence, images 1 to 4 animate the engine flame
  36. Rem the 5 is the delay in 50ths of a second between each frame, change the   
  37. Rem 5s to see the animation in slow or faster motion.  
  38. Rem the L at the end tells Amos we want the animation to Loop continuously 
  39. Rem and not just play once, remove the L to see the effect.
  40. '--------------------------------------------------------------------------
  41. Anim 1,"(1,5)(2,5)(3,5)(4,5)l"
  42.  
  43.  
  44. Rem Tell Amos to start the Animation 
  45. '------------------------------------
  46. Anim On 
  47.  
  48.  
  49. Rem CLEAR the KEYboard buffer of keypresses ans WAIT for a KEY press   
  50. '------------------------------------------------------------------- 
  51. Clear Key : Wait Key 
  52.  
  53.  
  54. Rem show memory banks  
  55. '--------------------  
  56. List Bank